package com.flycat.common.enumeration;

import java.util.Arrays;

/**
 * Created by linkun on 2017/10/4.
 */
public enum  TypeEnum {

    PIN_CAR("1", "拼车"),
    ZHUAN_CAR("2", "专车"),
    ;

    public String code;

    public String msg;

    TypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public static TypeEnum getEnum(String type) {
        return Arrays.stream(TypeEnum.values()).filter(item-> item.code.equals(type)).findFirst().get();
    }
}
